<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>Sentences</title>
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/styles.css') }}" />
    <link rel="stylesheet" type="text/css" href="/theme/current">
    <link rel="stylesheet" type="text/css" href="/theme/custom_styles">
    <style>
      body {
        margin: 0;
        padding: 2.5rem;
        padding-top: 1.5rem;
      }
      p.term {
          font-style: italic;
      }
    </style>

  </head>

  <body>

    {% if no_references %}
    <p>No references found for "{{ text }}":</p>
    <ul>
      <li>This may be a new term.</li>
      <li>The page containing this word may not be marked as "read" (see
        <a href="https://luteorg.github.io/lute-manual/faq/terms/sentences-only-shown-when-page-is-read.html"
           target="_blank">the manual</a>
        ).
      </li>
      <li>Books containing this term may have been deleted.</li>
    </ul>
    {% endif %}

    {% for k, dtos in references %}
    {% if dtos|length > 0 %}
    <p class="term">{{ k }}</p>
    <ul class="sentencelist">
      {% for dto in dtos %}
      <li style="margin-top: 4px;">
        {{ dto.sentence | safe }}
        <br/>
        <a href="/read/{{ dto.book_id }}/page/{{ dto.page_number }}"
           target="_blank"
           style="cursor: pointer; font-size: 0.9em; font-style: italic;">
          {{ dto.title }}
        </a>
      </li>
      {% endfor %}
    </ul>
    {% endif %}
    {% endfor %}

  </body>

</html>

